package info.motteke.mixivoice4j.http.json.photo.get;

import info.motteke.mixivoice4j.http.json.JsonRequestBuilder;

public class GetPhotoThumbnailUrlBuilder extends JsonRequestBuilder<GetPhotoThumbnailUrlRequest> {

    private long ownerId;

    private long memberId;

    private String photoId;

    private String postKey;

    public GetPhotoThumbnailUrlBuilder ownerId(long ownerId) {
        this.ownerId = ownerId;

        return this;
    }

    public GetPhotoThumbnailUrlBuilder memberId(long memberId) {
        this.memberId = memberId;
        return this;
    }

    public GetPhotoThumbnailUrlBuilder photoId(String photoId) {
        this.photoId = photoId;
        return this;
    }

    public GetPhotoThumbnailUrlBuilder postKey(String postKey) {
        this.postKey = postKey;
        return this;
    }

    @Override
    public GetPhotoThumbnailUrlRequest build() {
        check(postKey, "postKey");
        check(photoId, "photoId");

        GetPhotoThumbnailUrlRequest req = new GetPhotoThumbnailUrlRequest();
        GetPhotoThumbnailUrlParam p = req.getParams();
        p.setMemberId(memberId);
        p.setOwnerId(ownerId);
        p.setPhotoId(photoId);
        p.setPostKey(postKey);

        return req;
    }
}